package util

// SplitSlice 将切片array按照固定长度size拆分成多个切片
func SplitSlice(array []string, size int) [][]string {
	var result [][]string
	for size < len(array) {
		array, result = array[size:], append(result, array[:size])
	}
	if len(array) > 0 {
		result = append(result, array)
	}
	return result
}